package com.aaa.dem1031.d02;

/**
 * @Author: whj
 * @Version 1.0
 * @Date: 2022/10/31  15:33
 */
public class Test {
    public static void main(String[] args) {
        //创建任务对象
        MyRunnable task = new MyRunnable();
        //创建线程对象
        Thread thread = new Thread(task);
        //开启线程， 回执行Runnable中的run方法
        thread.start();
        for (int i = 0; i <10 ; i++) {
            System.out.println(Thread.currentThread().getName()+"**"+i);
        }
    }
}
